/**
 * FileName：ErrorEnum.class
 *
 * @author: liujie
 * @date: 2020-04-23 16:54
 */
package com.wangc.commons.enums;

/**
 * result信息公共枚举类
 *
 * @author: liujie
 * @date: 2020/4/23
 */
public enum CommonCodeEnum {
    SUCCESS(20000,"success"),
    QUERY_SUCCESS(20001,"查询成功"),
    QUERY_ERROR(20002,"查询失败"),
    UPDATE_SUCCESS(20003,"更新成功"),
    UPDATE_ERROR(20004,"更新失败"),
    DELETE_SUCCESS(20005,"删除成功"),
    DELETE_ERROR(20006,"删除失败"),
    ERROR(50000,"失败"),
    END(0, "");

    private int code;

    private String message;

    CommonCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}
